<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #height {
            margin-bottom: 10px;
        }

        #calculate {
            margin-left: 52px;
        }

        #perimeter {
            margin-bottom: 10px;
            margin-top: 10px;
        }

        #height {
            margin-top: 10px;
        }
    </style>
</head>

<body>
    <div>
        <span>宽度：</span>
        <input id="width" type="text" required />
        <br />
        <span>高度：</span>
        <input id="height" type="text" required />
        <br />
        <input id="calculate" type="button" value="计算" />
        <br />
        <span>周长：</span>
        <input id="perimeter" type="text" disabled="true" />
        <br />
        <span>面积：</span>
        <input id="area" type="text" disabled="true" />
    </div>
</body>
<script src="input.js"></script>

</html>